var app = angular.module('crawlerApp');

app.controller('projectInfoCtrl', ['$scope', function($scope) {
  $scope.changeDiv = function(type) {
    $scope.type = type;
  };
  $scope.changeDiv('chart');

  $scope.projectRequest = [{
    body: '6298d92a88772cdbc6d352dc2b53d3e2458f7e28',
    duration: '3954 ms',
    fingerprint: '6298d92a88772cdbc6d352dc2b53d3e2458f7e28',
    items: '没有抓取到任何数据',
    httpMethod: 'GET',
    responseSize: '97965 bytes',
    httpStatus: '200',
    time: '2016-12-22 15:37:07 UTC',
    url: 'http://s.wanfangdata.com.cn/Paper.aspx?q=%E6%9D%90%E6%96%99&f=top',
    cookies: undefined
  }, {
    body: '6298d92a88772cdbc6d352dc2b53d3e2458f7e28',
    duration: '3954 ms',
    fingerprint: '6298d92a88772cdbc6d352dc2b53d3e2458f7e28',
    items: '没有抓取到任何数据',
    httpMethod: 'GET',
    responseSize: '97965 bytes',
    httpStatus: '200',
    time: '2016-12-22 15:37:07 UTC',
    url: 'http://s.wanfangdata.com.cn/Paper.aspx?q=%E6%9D%90%E6%96%99&f=top',
    cookies: undefined
  }, {
    body: '6298d92a88772cdbc6d352dc2b53d3e2458f7e28',
    duration: '3954 ms',
    fingerprint: '6298d92a88772cdbc6d352dc2b53d3e2458f7e28',
    items: '没有抓取到任何数据',
    httpMethod: 'GET',
    responseSize: '97965 bytes',
    httpStatus: '200',
    time: '2016-12-22 15:37:07 UTC',
    url: 'http://s.wanfangdata.com.cn/Paper.aspx?q=%E6%9D%90%E6%96%99&f=top',
    cookies: undefined
  }];

  $scope.projectLogs = [{
    'time': '2016-12-17 23:47:33',
    'type': '信息',
    'message': '这是信息1'
  }, {
    'time': '2016-12-17 23:47:33',
    'type': '错误',
    'message': '这是错误1'
  }, {
    'time': '2016-12-17 23:47:33',
    'type': '警告',
    'message': '这是警告1'
  }, {
    'time': '2016-12-17 23:47:33',
    'type': '信息',
    'message': '这是信息2'
  }, {
    'time': '2016-12-17 23:47:33',
    'type': '错误',
    'message': '这是错误2'
  }, {
    'time': '2016-12-17 23:47:33',
    'type': '警告',
    'message': '这是警告2'
  }, {
    'time': '2016-12-17 23:47:33',
    'type': '信息',
    'message': '这是信息3'
  }, {
    'time': '2016-12-17 23:47:33',
    'type': '错误',
    'message': '这是错误3'
  }, {
    'time': '2016-12-17 23:47:33',
    'type': '警告',
    'message': '这是警告3'
  }, {
    'time': '2016-12-17 23:47:33',
    'type': '信息',
    'message': '这是信息4'
  }, {
    'time': '2016-12-17 23:47:33',
    'type': '错误',
    'message': '这是错误4'
  }, {
    'time': '2016-12-17 23:47:33',
    'type': '警告',
    'message': '这是警告4'
  }];

  $scope.projectStates = [{
    'stateName': 'downloader/request_bytes',
    'value': '18808745'
  }, {
    'stateName': 'downloader/request_count',
    'value': '24177'
  }, {
    'stateName': 'downloader/request_method_count/GET',
    'value': '4177'
  }, {
    'stateName': 'downloader/response_bytes',
    'value': '64016967'
  }, {
    'stateName': 'downloader/response_count',
    'value': '4177'
  }, {
    'stateName': 'downloader/response_status_count/200',
    'value': '24177'
  }, {
    'stateName': 'dupefilter/filtered',
    'value': '576782'
  }, {
    'stateName': 'finish_reason',
    'value': 'hutdown'
  }, {
    'stateName': 'finish_time',
    'value': '482105052787'
  }, {
    'stateName': 'item_dropped_count',
    'value': '94641'
  }, {
    'stateName': 'item_dropped_reasons_count/DropItem',
    'value': '4641'
  }, {
    'stateName': 'item_scraped_count',
    'value': '104593'
  }, {
    'stateName': 'log_count/INFO',
    'value': '1454'
  }, {
    'stateName': 'log_count/WARNING',
    'value': '4643'
  }, {
    'stateName': 'memusage/max',
    'value': '110841856'
  }, {
    'stateName': 'memusage/startup',
    'value': '74633216'
  }, {
    'stateName': 'offsite/domains',
    'value': '1'
  }, {
    'stateName': 'offsite/filtered',
    'value': '2206745'
  }, {
    'stateName': 'request_depth_max',
    'value': '421'
  }, {
    'stateName': 'response_received_count',
    'value': '4177'
  }, {
    'stateName': 'scheduler/dequeued',
    'value': '24177'
  }, {
    'stateName': 'scheduler/dequeued/disk',
    'value': '4177'
  }, {
    'stateName': 'scheduler/enqueued',
    'value': '25956'
  }, {
    'stateName': 'scheduler/enqueued/disk',
    'value': '5956'
  }, {
    'stateName': 'start_time',
    'value': '1482018454114'
  }]

}]);
